home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
amok_lha
/
amok40.lha
/
Environment
/
MPDat.Mod
< prev
next >
Wrap
Text File
|
1993-08-15
|
2KB
|
66 lines
IMPLEMENTATION MODULE MPDat;
(*---------------------------------------------------------------------------
:Program. MPDat.Mod
:Version. 3.3
:History. Mar-90
:Author. Markus Peuckert
:Address. Schützenstr. 50, D-3550 Marburg, West-Germany,
:Copyright. ShareWare
:Language. Modula-2
:Translator. M2Amiga V3.3d
---------------------------------------------------------------------------*)
FROM SYSTEM IMPORT ADR;
FROM Arts IMPORT Assert;
FROM ASCII IMPORT lf;
FROM FileSystem IMPORT File, Lookup, Close, ReadChar, WriteChar, done;
FROM Strings IMPORT Length;
PROCEDURE OpenConfig (VAR Datei : File; Name : ARRAY OF CHAR; new : BOOLEAN);
BEGIN
Lookup (Datei, Name, 0, new);
IF Datei.res#done THEN
Lookup (Datei, Name, 0, TRUE)
END;
Assert (Datei.res=done, ADR("Compi.config nicht initialisierbar!"))
END OpenConfig;
PROCEDURE CloseConfig (Datei : File);
BEGIN
Close (Datei)
END CloseConfig;
PROCEDURE GetConfigParams (Datei : File; VAR Dummy : ARRAY OF CHAR);
VAR ch : CHAR;
i : CARDINAL;
BEGIN
i:=0;
LOOP
ReadChar (Datei, ch);
IF Datei.eof OR (Datei.res # done) OR (ch = lf) THEN
Dummy [i] := 0C;
EXIT
END;
Dummy [i] := ch; INC (i);
END
END GetConfigParams;
PROCEDURE SetConfigParams (Datei : File; VAR Dummy : ARRAY OF CHAR);
VAR ch : CHAR;
i, len : LONGCARD;
BEGIN
i:=0; len := Length (Dummy);
LOOP
WriteChar (Datei, Dummy[i]);
IF (i = len+1) THEN
WriteChar (Datei, lf);
EXIT
END;
INC (i);
END
END SetConfigParams;
END MPDat.Mod